mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Don't name test-generator the same as the function being exercised by it.
This commit is contained in:
parent
f1d220429d
commit
51c69cac8b
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
;;;; Helpers
|
||||
|
||||
(defun check-deprecated-thing (namespace name state make-body
|
||||
(defun test (namespace name state make-body
|
||||
&key replacements
|
||||
(call t)
|
||||
(expected-warning-count '(eql 1))
|
||||
|
|
@ -132,20 +132,20 @@
|
|||
:replacement ,replacement)))
|
||||
|
||||
(with-test (:name (deprecated variable ,tag ,state))
|
||||
(check-deprecated-thing
|
||||
(test
|
||||
'variable ',variable-name ,state
|
||||
(lambda (name) `(,name))
|
||||
:replacements '(,(string replacement))
|
||||
:call ,call
|
||||
:check-describe ,check-describe)
|
||||
,@(when symbol-value
|
||||
`((check-deprecated-thing
|
||||
`((test
|
||||
'variable ',variable-name ,state
|
||||
(lambda (name) `((symbol-value ',name)))
|
||||
:replacements '(,(string replacement))
|
||||
:call ,call
|
||||
:check-describe ,check-describe)
|
||||
(check-deprecated-thing
|
||||
(test
|
||||
'variable ',variable-name ,state
|
||||
(lambda (name) `((symbol-global-value ',name)))
|
||||
:replacements '(,(string replacement))
|
||||
|
|
@ -195,7 +195,7 @@
|
|||
:replacement ,replacement)))
|
||||
|
||||
(with-test (:name (deprecated function ,tag ,state))
|
||||
(check-deprecated-thing
|
||||
(test
|
||||
'function ',function-name ,state
|
||||
(lambda (name) `((,name)))
|
||||
:replacements '(,(string replacement))
|
||||
|
|
@ -249,7 +249,7 @@
|
|||
(test-util:with-test (:name (deprecated type
|
||||
,@(sb-int:ensure-list tag)
|
||||
,state))
|
||||
(check-deprecated-thing
|
||||
(test
|
||||
'type ',type-name ,state
|
||||
(lambda (name)
|
||||
`((let ((x))
|
||||
|
|
@ -285,14 +285,14 @@
|
|||
(deftype ,name () 'integer)
|
||||
(declaim (deprecated :early ("some-lib" "1.2.3") (type ,name)))))
|
||||
;; Make sure the deprecation declaration works.
|
||||
(check-deprecated-thing
|
||||
(test
|
||||
'type name :early
|
||||
(lambda (name)
|
||||
`((typep 1 ',name)))
|
||||
:call nil)
|
||||
;; Check that the declaration does not apply to an unrelated class
|
||||
;; of the same name.
|
||||
(check-deprecated-thing
|
||||
(test
|
||||
'type name :early
|
||||
(lambda (name)
|
||||
`((make-instance ,(make-instance 'standard-class :name name))))
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
;;;; Helpers
|
||||
|
||||
(defun check-deprecated-thing (kind name state make-body
|
||||
(defun test (kind name state make-body
|
||||
&key (replacements
|
||||
(list (format nil "~A.~A"
|
||||
name '#:replacement))))
|
||||
|
|
@ -61,11 +61,11 @@
|
|||
:replacement deprecated-variable.early.replacement)
|
||||
|
||||
(with-test (:name (sb-int:define-deprecated-variable :early))
|
||||
(check-deprecated-thing 'variable 'deprecated-variable.early :early
|
||||
(test 'variable 'deprecated-variable.early :early
|
||||
(lambda (name) `(,name)))
|
||||
(check-deprecated-thing 'variable 'deprecated-variable.early :early
|
||||
(test 'variable 'deprecated-variable.early :early
|
||||
(lambda (name) `((symbol-value ',name))))
|
||||
(check-deprecated-thing 'variable 'deprecated-variable.early :early
|
||||
(test 'variable 'deprecated-variable.early :early
|
||||
(lambda (name) `((symbol-global-value ',name)))))
|
||||
|
||||
(sb-int:define-deprecated-variable :late "1.2.10"
|
||||
|
|
@ -74,11 +74,11 @@
|
|||
:replacement deprecated-variable.late.replacement)
|
||||
|
||||
(with-test (:name (sb-int:define-deprecated-variable :late))
|
||||
(check-deprecated-thing 'variable 'deprecated-variable.late :late
|
||||
(test 'variable 'deprecated-variable.late :late
|
||||
(lambda (name) `(,name)))
|
||||
(check-deprecated-thing 'variable 'deprecated-variable.late :late
|
||||
(test 'variable 'deprecated-variable.late :late
|
||||
(lambda (name) `((symbol-value ',name))))
|
||||
(check-deprecated-thing 'variable 'deprecated-variable.late :late
|
||||
(test 'variable 'deprecated-variable.late :late
|
||||
(lambda (name) `((symbol-global-value ',name)))))
|
||||
|
||||
(sb-int:define-deprecated-variable :final "1.2.10"
|
||||
|
|
@ -87,11 +87,11 @@
|
|||
:replacement deprecated-variable.final.replacement)
|
||||
|
||||
(with-test (:name (sb-int:define-deprecated-variable :final))
|
||||
(check-deprecated-thing 'variable 'deprecated-variable.final :final
|
||||
(test 'variable 'deprecated-variable.final :final
|
||||
(lambda (name) `(,name)))
|
||||
(check-deprecated-thing 'variable 'deprecated-variable.final :final
|
||||
(test 'variable 'deprecated-variable.final :final
|
||||
(lambda (name) `((symbol-value ',name))))
|
||||
(check-deprecated-thing 'variable 'deprecated-variable.final :final
|
||||
(test 'variable 'deprecated-variable.final :final
|
||||
(lambda (name) `((symbol-global-value ',name)))))
|
||||
|
||||
|
||||
|
|
@ -102,7 +102,7 @@
|
|||
:deprecated)
|
||||
|
||||
(with-test (:name (sb-int:define-deprecated-function :early))
|
||||
(check-deprecated-thing 'function 'deprecated-function.early :early
|
||||
(test 'function 'deprecated-function.early :early
|
||||
(lambda (name) `((,name)))))
|
||||
|
||||
(sb-int:define-deprecated-function :late "1.2.10"
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
:deprecated)
|
||||
|
||||
(with-test (:name (sb-int:define-deprecated-function :late))
|
||||
(check-deprecated-thing 'function 'deprecated-function.late :late
|
||||
(test 'function 'deprecated-function.late :late
|
||||
(lambda (name) `((,name)))))
|
||||
|
||||
(sb-int:define-deprecated-function :final "1.2.10"
|
||||
|
|
@ -118,7 +118,7 @@
|
|||
:deprecated)
|
||||
|
||||
(with-test (:name (sb-int:define-deprecated-function :final))
|
||||
(check-deprecated-thing 'function 'deprecated-function.final :final
|
||||
(test 'function 'deprecated-function.final :final
|
||||
(lambda (name) `((,name)))))
|
||||
|
||||
(sb-int:define-deprecated-function :early "1.2.10"
|
||||
|
|
@ -129,7 +129,7 @@
|
|||
:deprecated)
|
||||
|
||||
(with-test (:name (sb-int:define-deprecated-function :two-replacements))
|
||||
(check-deprecated-thing
|
||||
(test
|
||||
'function 'deprecated-function.two-replacements :early
|
||||
(lambda (name) `((,name)))
|
||||
:replacements '("DEPRECATED-FUNCTION.TWO-REPLACEMENTS.REPLACEMENT1"
|
||||
|
|
@ -144,7 +144,7 @@
|
|||
:deprecated)
|
||||
|
||||
(with-test (:name (sb-int:define-deprecated-function :three-replacements))
|
||||
(check-deprecated-thing
|
||||
(test
|
||||
'function 'deprecated-function.three-replacements :early
|
||||
(lambda (name) `((,name)))
|
||||
:replacements '("DEPRECATED-FUNCTION.THREE-REPLACEMENTS.REPLACEMENT1"
|
||||
|
|
|
|||
Loading…
Reference in a new issue