Commit 130b7da6 authored by Luís Oliveira's avatar Luís Oliveira

Define an alexandria-tests ASDF system.

- make it usable for other Lisps besides SBCL.
- TEST-OP runs tests both compiled and evaluated.
parent 0a57a015
(defsystem alexandria-tests
:depends-on (:alexandria #+sbcl :sb-rt #-sbcl :rt)
:components ((:file "tests")))
(defmethod operation-done-p
((o test-op) (c (eql (find-system :alexandria-tests))))
nil)
(defmethod perform ((o test-op) (c (eql (find-system :alexandria-tests))))
(flet ((run-tests (&rest args)
(apply (intern (string '#:run-tests) '#:alexandria-tests) args)))
(run-tests :compiled nil)
(run-tests :compiled t)))
\ No newline at end of file
......@@ -21,3 +21,10 @@
(:file "sequences" :depends-on ("package" "lists" "types"))
(:file "numbers" :depends-on ("package" "sequences"))
(:file "features" :depends-on ("package" "control-flow"))))
(defmethod operation-done-p ((o test-op) (c (eql (find-system :alexandria))))
nil)
(defmethod perform ((o test-op) (c (eql (find-system :alexandria))))
(operate 'load-op :alexandria-tests)
(operate 'test-op :alexandria-tests))
\ No newline at end of file
(in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel)
(require :sb-rt))
(defpackage :alexandria-tests
(:use :cl :alexandria #+sbcl :sb-rt #-sbcl :rtest)
(:import-from #+sbcl :sb-rt #-sbcl :rtest
#:*compile-tests* #:*expected-failures*))
(require :alexandria)
(in-package :alexandria-tests)
(defpackage :alexandria-test
(:use :cl :alexandria :sb-rt))
(in-package :alexandria-test)
(defun run-tests (&key ((:compiled *compile-tests)))
(do-tests))
;;;; Arrays
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment