X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-cover%2Ftests.lisp;h=ea54b7537680fe9e354673714441afd61ef9e5aa;hb=c8fedad1fe873eeb483868ec75d292973071f33d;hp=6fb3d9a4006c6a8cadd48fc88e178b1f0f9b269e;hpb=49e92ee57b3b01f5862d0c6fa65f521de1688941;p=sbcl.git diff --git a/contrib/sb-cover/tests.lisp b/contrib/sb-cover/tests.lisp index 6fb3d9a..ea54b75 100644 --- a/contrib/sb-cover/tests.lisp +++ b/contrib/sb-cover/tests.lisp @@ -28,11 +28,18 @@ (load (compile-file (merge-pathnames #p"test-data-1.lisp" *path*))) (report-expect-failure) -;;; Instrument the file, try again +;;; Instrument the file, try again -- first with a non-directory pathname (proclaim '(optimize sb-cover:store-coverage-data)) (load (compile-file (merge-pathnames #p"test-data-1.lisp" *path*))) +(catch 'ok + (handler-case + (sb-cover:report #p"/tmp/foo") + (error () + (throw 'ok nil))) + (error "REPORT with a non-pathname directory did not signal an error.")) + (report) (assert (probe-file (make-pathname :name "cover-index" :type "html" @@ -92,3 +99,13 @@ ;; Complete branch coverage (assert (= (sb-cover::ok-of (getf sb-cover::*counts* :branch)) (sb-cover::all-of (getf sb-cover::*counts* :branch)))) + +;; Check for presence of constant coalescing bugs + +(load (compile-file (merge-pathnames #p"test-data-3.lisp" *path*))) +(test-2) + +;; Clean up after the tests + +(map nil #'delete-file + (directory (merge-pathnames #p"*.html" *output-directory*)))