I am runninig LispWorks verion 5.0 on Windows XP.
The 19 warnings I get annoy me. Is there a way to prevent this?
They are all on the form:
;;;*** Warning in (METHOD LIFT::MAKE-SINGLE-PROTOTYPE
(MY-USER::STRING-TEST)): symbol-macro PHONETICS is bound but not referenced
Help is appreciated.
------------------------------------------------------------------------------------
This is the test code
;;
;; testing
;;
(deftestsuite set-test () ())
(deftestsuite string-test (set-test)
((phonetics (list "alfa" "bravo" "charlie" "delta" "echo" "foxtrot"
"golf"
"hotel" "india" "juliet" "kilo" "lima" "mama"
"november"
"oscar" "papa" "qbeck" "romeo" "sierra" "tango"
"uniform"
"victor" "wiskey" "x-ray" "yankee" "zulu"))
list1 list2)
(:function
(random-n-phonetics (n)
(check-type n (integer 0 25))
(iter
(with result = nil)
(with p = phonetics)
(repeat n)
( for len downfrom 26)
(let ((val (nth (random len) p)))
( setf result (set-insert val result :test #'string-lessp))
(setf p (remove val p :count 1)))
(finally (return result)))))
(:equality-test 'equalp)
(:run-setup :once-per-suite)
(:setup
(setf list1 (random-n-phonetics (random 10)))
(setf list2 (random-n-phonetics (random 10))))
(:test (union
(ensure-same
(set-union list1 list2 :test #'string-lessp)
(sort (union list1 list2) #'string-lessp))))
(:test (intersection
(ensure-same
(set-intersection list1 list2 :test #'string-lessp)
(sort (intersection list1 list2 :test #'string-equal)
#'string-lessp)))))
(defun test< (a b)
(cond
((not (or a b)) nil)
((not (and a b)) t)
(t (< a b))))
(deftestsuite integer-test (set-test)
(array1 array2)
(:function
(random-n-numbers (n max)
(let ((seq (make-array 16 :adjustable t :fill-pointer
0)))
(iter (repeat n) (set-insert (random max) seq :test
#'test<))
seq)))
(:equality-test 'equalp)
(:run-setup :once-per-suite)
(:setup
(setf array1 (random-n-numbers 10 20))
(setf array2 (random-n-numbers 10 20)))
(:test (union
(ensure-same
(set-union array1 array2 :test #'test<)
(coerce (sort
(union (coerce array1 'list)
(coerce array2 'list))
#'<)
'vector))))
(:test (intersection
(ensure-same
(set-intersection array1 array2 :test #'test<)
(coerce (sort
(intersection (coerce array1 'list)
(coerce array2 'list))
#'<)
'vector)))))
------------------------------------------------------------------------------------
This is the warnings generated
;;;*** Warning in (METHOD LIFT::MAKE-SINGLE-PROTOTYPE
(MY-USER::STRING-TEST)): symbol-macro PHONETICS is bound but not referenced
;;;*** Warning in (METHOD LIFT::MAKE-SINGLE-PROTOTYPE
(MY-USER::STRING-TEST)): symbol-macro LIST1 is bound but not referenced
;;;*** Warning in (METHOD LIFT::MAKE-SINGLE-PROTOTYPE
(MY-USER::STRING-TEST)): symbol-macro LIST2 is bound but not referenced
;;;*** Warning in (METHOD LIFT::MAKE-SINGLE-PROTOTYPE
(MY-USER::STRING-TEST)): symbol-macro LIFT-RESULT is bound but not
referenced
;;;*** Warning in (METHOD LIFT::FLET-TEST-FUNCTION (MY-USER::STRING-TEST
(EQL (QUOTE MY-USER::RANDOM-N-PHONETICS)))): symbol-macro LIST1 is bound
but not referenced
;;;*** Warning in (METHOD LIFT::FLET-TEST-FUNCTION (MY-USER::STRING-TEST
(EQL (QUOTE MY-USER::RANDOM-N-PHONETICS)))): symbol-macro LIST2 is bound
but not referenced
;;;*** Warning in (METHOD LIFT::FLET-TEST-FUNCTION (MY-USER::STRING-TEST
(EQL (QUOTE MY-USER::RANDOM-N-PHONETICS)))): symbol-macro LIFT-RESULT is
bound but not referenced
;;;*** Warning in (METHOD LIFT::SETUP-TEST :AFTER (MY-USER::STRING-TEST)):
symbol-macro PHONETICS is bound but not referenced
;;;*** Warning in (METHOD LIFT::SETUP-TEST :AFTER (MY-USER::STRING-TEST)):
symbol-macro LIFT-RESULT is bound but not referenced
;;;*** Warning in (METHOD LIFT::LIFT-TEST (MY-USER::STRING-TEST (EQL
(QUOTE UNION)))): symbol-macro PHONETICS is bound but not referenced
;;;*** Warning in (METHOD LIFT::LIFT-TEST (MY-USER::STRING-TEST (EQL
(QUOTE UNION)))): symbol-macro LIFT-RESULT is bound but not referenced
;;;*** Warning in (METHOD LIFT::LIFT-TEST (MY-USER::STRING-TEST (EQL
(QUOTE INTERSECTION)))): symbol-macro PHONETICS is bound but not referenced
;;;*** Warning in (METHOD LIFT::LIFT-TEST (MY-USER::STRING-TEST (EQL
(QUOTE INTERSECTION)))): symbol-macro LIFT-RESULT is bound but not
referenced
; (TOP-LEVEL-FORM 8)
; MY-USER::TEST<
; (TOP-LEVEL-FORM 9)
; (TOP-LEVEL-FORM 10)
; (DEFCLASS MY-USER::INTEGER-TEST)
;;;*** Warning in (METHOD LIFT::FLET-TEST-FUNCTION (MY-USER::INTEGER-TEST
(EQL (QUOTE MY-USER::RANDOM-N-NUMBERS)))): symbol-macro ARRAY1 is bound
but not referenced
;;;*** Warning in (METHOD LIFT::FLET-TEST-FUNCTION (MY-USER::INTEGER-TEST
(EQL (QUOTE MY-USER::RANDOM-N-NUMBERS)))): symbol-macro ARRAY2 is bound
but not referenced
;;;*** Warning in (METHOD LIFT::FLET-TEST-FUNCTION (MY-USER::INTEGER-TEST
(EQL (QUOTE MY-USER::RANDOM-N-NUMBERS)))): symbol-macro LIFT-RESULT is
bound but not referenced
;;;*** Warning in (METHOD LIFT::SETUP-TEST :AFTER
(MY-USER::INTEGER-TEST)): symbol-macro LIFT-RESULT is bound but not
referenced
;;;*** Warning in (METHOD LIFT::LIFT-TEST (MY-USER::INTEGER-TEST (EQL
(QUOTE UNION)))): symbol-macro LIFT-RESULT is bound but not referenced
;;;*** Warning in (METHOD LIFT::LIFT-TEST (MY-USER::INTEGER-TEST (EQL
(QUOTE INTERSECTION)))): symbol-macro LIFT-RESULT is bound but not
referenced
; (TOP-LEVEL-FORM 11)
;;; Compilation finished with 19 warnings, 0 errors.
------------------------------------------------------------------------------------
this is the result of running the code
MY-USER 4 > (run-tests :suite 'set-test)
#<Results for SET-TEST [4 Successful tests]>
--------------
John Thingstad