+ (error "expected ~S in FUNCALL COMPILE ~S" expected-result form))
+ ;; also do some testing of compilation and verification that
+ ;; errors are thrown appropriately.
+ (unless (eql expected-result
+ (funcall (compile nil `(lambda () (aref ,form 3)))))
+ (error "expected ~S in COMPILED-AREF ~S" expected-result form))
+ (when type
+ (unless (eql expected-result
+ (funcall (compile nil `(lambda () (let ((x ,form))
+ (declare (type ,type x))
+ (aref x 3))))))
+ (error "expected ~S in COMPILED-DECLARED-AREF ~S" expected-result form)))
+ (when (ignore-errors (aref (eval form) 12))
+ (error "error not thrown in EVAL ~S" form))
+ (when (ignore-errors (aref (funcall (compile nil `(lambda () ,form))) 12))
+ (error "error not thrown in FUNCALL COMPILE ~S"))
+ (when (ignore-errors (funcall (compile nil `(lambda () (aref ,form 12)))))
+ (error "error not thrown in COMPILED-AREF ~S" form))
+ (when type
+ (when (ignore-errors (funcall
+ (compile nil `(lambda () (let ((x ,form))
+ (declare (type ,type x))
+ (aref x 12))))))
+ (error "error not thrown in COMPILED-DECLARED-AREF ~S" form))))))
+