package-error-package.lsp 1.29 KB
Newer Older
1 2 3 4 5 6 7 8 9
;-*- Mode:     Lisp -*-
;;;; Author:   Paul Dietz
;;;; Created:  Sun Feb 22 06:52:56 2004
;;;; Contains: Tests of PACKAGE-ERROR-PACKAGE

(in-package :cl-test)

(deftest package-error-package.1
  (eqt (find-package (package-error-package
sds's avatar
sds committed
10 11
                      (make-condition 'package-error
                                      :package "CL")))
12 13 14 15 16
       (find-package "CL"))
  t)

(deftest package-error-package.2
  (eqt (find-package (package-error-package
sds's avatar
sds committed
17 18
                      (make-condition 'package-error
                                      :package (find-package "CL"))))
19 20 21 22 23
       (find-package "CL"))
  t)

(deftest package-error-package.3
  (eqt (find-package (package-error-package
sds's avatar
sds committed
24 25
                      (make-condition 'package-error
                                      :package '#:|CL|)))
26 27 28 29 30
       (find-package "CL"))
  t)

(deftest package-error-package.4
  (eqt (find-package (package-error-package
sds's avatar
sds committed
31 32
                      (make-condition 'package-error
                                      :package #\A)))
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
       (find-package "A"))
  t)

(deftest package-error-package.error.1
  (signals-error (package-error-package) program-error)
  t)

(deftest package-error-package.error.2
  (signals-error
   (package-error-package
    (make-condition 'package-error :package #\A)
    nil)
   program-error)
  t)