Commit 9acc5bd5 authored by Philipp Marek's avatar Philipp Marek
Browse files

Merge branch 'asdf' into 'master'

Use modern ASDF style and define all systems in alexandria.asd

See merge request !26
parents 1e5b8e8f e7f68af6
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
(in-package :cl-user)

(defpackage :alexandria-tests
(defpackage :alexandria/tests
  (:use :cl :alexandria #+sbcl :sb-rt #-sbcl :rtest)
  (:import-from #+sbcl :sb-rt #-sbcl :rtest
                #:*compile-tests* #:*expected-failures*))

(in-package :alexandria-tests)
(in-package :alexandria/tests)

(defun run-tests (&key ((:compiled *compile-tests*)))
  (do-tests))
+2 −2
Original line number Diff line number Diff line
(in-package :cl-user)

(defpackage :alexandria2-tests
(defpackage :alexandria-2/tests
  (:use :cl :alexandria-2 #+sbcl :sb-rt #-sbcl :rtest)
  (:import-from #+sbcl :sb-rt #-sbcl :rtest
                #:*compile-tests* #:*expected-failures*))

(in-package :alexandria2-tests)
(in-package :alexandria-2/tests)

;; Arrays Tests
(deftest dim-in-bounds-p.0

alexandria-tests.asd

deleted100644 → 0
+0 −16
Original line number Diff line number Diff line
(defsystem "alexandria-tests"
  :licence "Public Domain / 0-clause MIT"
  :description "Tests for Alexandria, which is a collection of portable public domain utilities."
  :author "Nikodemus Siivola <nikodemus@sb-studio.net>, and others."
  :depends-on (:alexandria #+sbcl :sb-rt #-sbcl :rt)
  :components ((:file "alexandria-1/tests")
               (:file "alexandria-2/tests"))
  :perform (test-op (o c)
             (let ((unexpected-failure-p nil))
               (flet ((run-tests (&rest args)
                        (unless (apply (intern (string '#:run-tests) '#:alexandria-tests) args)
                          (setf unexpected-failure-p t))))
                 (run-tests :compiled nil)
                 (run-tests :compiled t))
               (when unexpected-failure-p
                 (error "Unexpected test failure")))))
+18 −1
Original line number Diff line number Diff line
@@ -67,4 +67,21 @@ the following constraints:
                         (:file "control-flow" :depends-on ("package"))
                         (:file "sequences" :depends-on ("package"))
                         (:file "lists" :depends-on ("package")))))
  :in-order-to ((test-op (test-op "alexandria-tests"))))
  :in-order-to ((test-op (test-op "alexandria/tests"))))

(defsystem "alexandria/tests"
  :licence "Public Domain / 0-clause MIT"
  :description "Tests for Alexandria, which is a collection of portable public domain utilities."
  :author "Nikodemus Siivola <nikodemus@sb-studio.net>, and others."
  :depends-on (:alexandria #+sbcl :sb-rt #-sbcl :rt)
  :components ((:file "alexandria-1/tests")
               (:file "alexandria-2/tests"))
  :perform (test-op (o c)
                    (let ((unexpected-failure-p nil))
                      (flet ((run-tests (&rest args)
                               (unless (apply (intern (string '#:run-tests) '#:alexandria/tests) args)
                                 (setf unexpected-failure-p t))))
                        (run-tests :compiled nil)
                        (run-tests :compiled t))
                      (when unexpected-failure-p
                        (error "Unexpected test failure")))))
+1 −1
Original line number Diff line number Diff line
;; Install all the deps
(ql:quickload "alexandria-tests")
(ql:quickload "alexandria/tests")

;; Run the tests!
(asdf:test-system "alexandria")