Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Karsten Poeck
ansi-test
Commits
bd1d60ba
Commit
bd1d60ba
authored
Feb 16, 2003
by
pfdietz
Browse files
Added tests for check-type
parent
236faa10
Changes
1
Hide whitespace changes
Inline
Side-by-side
ansi-tests/check-type.lsp
0 → 100644
View file @
bd1d60ba
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sat Feb 15 20:12:04 2003
;;;; Contains: Tests of CHECK-TYPE
(in-package :cl-test)
(deftest check-type.1
(let ((x 'a))
(values (check-type x symbol) x))
nil a)
(deftest check-type.2
(classify-error
(let ((x 'a))
(check-type x integer)))
type-error)
(deftest check-type.3
(let ((x 'a))
(handler-bind
((type-error #'(lambda (c) (store-value 15 c))))
(values (check-type x number) x)))
nil 15)
(deftest check-type.4
(let ((x 'a))
(values (check-type x symbol "a symbol") x))
nil a)
(deftest check-type.5
(let ((x 'a))
(handler-bind
((type-error #'(lambda (c) (store-value "abc" c))))
(values (check-type x string "a string") x)))
nil "abc")
(deftest check-type.6
(let ((x 'a))
(handler-bind
((type-error #'(lambda (c) (declare (ignore c)) (store-value 15 nil))))
(values (check-type x number) x)))
nil 15)
(deftest check-type.7
(let ((x 'a))
(handler-bind
((type-error #'(lambda (c) (declare (ignore c)) (store-value 15))))
(values (check-type x number) x)))
nil 15)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment