(defpackage ... :use :filofax) makes all *exported* symbols of filofax
available.
So, export the symbols you want accessible outside the package itself.
Stig Hemmer
On 3/26/12, David Creelman <creelman.david@...> wrote:
> Hi,
> My apologies, I think this is a general CL question, not really specific to
> SBCL.
>
> I am using the SB-RT testing framework and I have a package filofax of my
> own
> that holds all of the stuff that I'm wanting to test.
>
> If I choose to make a testing package which uses my package filofax and
> sb-rt, I still end up needing to prefix calls and returns with filofax::.
>
> My test jig is below:-
>
> (load "~/learn/lisp/github/filofax/rt.lisp")
> (asdf:operate 'asdf:load-op :filo)
> (ql:quickload "cl-pdf")
>
> (use-package :sb-rt)
>
> (defpackage :test-filo
> (:use :filofax :sb-rt))
>
>
> (in-package :test-filo)
>
> (deftest "dummy test"
> 1
> 1)
>
> (deftest "point"
> (filofax::make-point :x 1 :y 1)
> #S(point :X 1 :Y 1))
>
> (deftest "convert"
> (filofax::synonyms->coords 'filofax::n 'filofax::w)
> (list 'top 'left))
>
> (do-tests)
>
> When run I get the following errors. Even the result symbols need to be
> prefixed with filofax::
>
> (load "~/learn/lisp/github/filofax/tests.lisp")
> To load "cl-pdf":
> Load 1 ASDF system:
> cl-pdf
> ; Loading "cl-pdf"
>
> COMMON-LISP:WARNING: Redefining test "DUMMY TEST"
> COMMON-LISP:WARNING: Redefining test "POINT"
> COMMON-LISP:WARNING: Redefining test "CONVERT"
> Doing 3 pending tests of 3 tests total.
> "DUMMY TEST"
> Test "POINT" failed
> Form: (FILOFAX::MAKE-POINT :X 1 :Y 1)
> Expected value: #S(POINT :X 1 :Y 1)
> Actual value: #S(POINT :X 1 :Y 1).
> args are (N W)
> Test "CONVERT" failed
> Form: (SYNONYMS->COORDS 'FILOFAX::N 'FILOFAX::W)
> Expected value: (LIST 'TOP 'LEFT)
> Actual value: (FILOFAX::TOP FILOFAX::LEFT).
> 2 out of 3 total tests failed: "POINT", "CONVERT".
> T
>
> Is there some way that I can reference both sb-rt and filofax without
> resorting
> to :: notation ? The test "convert" shows how I need to prefix tests to get
> them to work correctly.
> I'd also like to be able to get at the non-published filofax symbols if
> possible.
>
> Any ideas?
>
> Cheers
> David
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Sbcl-help mailing list
> Sbcl-help@...
> https://lists.sourceforge.net/lists/listinfo/sbcl-help
>
|