You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In original lisp-unit I like to define tests for internal (unexpored function) below the function itself, in the same file. I use that for testing and for documentation.
Is that possible in lisp-unit2?
The following code demonstrates what I like to do in lisp-unit, and how I tried to achieve the same in lisp-unit2
(cl:in-package :cl-user)
(defpackage lu-example
(:use :cl)
(:documentation "Demonstrate that Lisp Unit test code can live in the same file and
package as source code"))
(in-package :lu-example)
(defun foo () t)
(lu:define-test foo
(lu:assert-true (foo)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defpackage :lu2-example-1
(:use :cl)
(:documentation "Demonstrate conflicts when I try to have Lisp Unit2 test code in the
same file and package."))
(in-package :lu2-example-1)
(defun foo () t)
;; I am not surprised by this failure
(lisp-unit2:define-test foo ()
(lisp-unit2:assert-true (foo)))
(defpackage :lu2-example-1.test
(:use :cl)
(:documentation "Lisp Unit 2 test package. I will try to place test code in that
package, but in the same file"))
;; I was hoping that this would work
(lisp-unit2:define-test foo (:package :lu2-example-1)
(lisp-unit2:assert-true (foo)))
Thank you,
Mirko
The text was updated successfully, but these errors were encountered:
This is not an issue but a question:
In original lisp-unit I like to define tests for internal (unexpored function) below the function itself, in the same file. I use that for testing and for documentation.
Is that possible in lisp-unit2?
The following code demonstrates what I like to do in lisp-unit, and how I tried to achieve the same in lisp-unit2
Thank you,
Mirko
The text was updated successfully, but these errors were encountered: