[racket] plai test/exn

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Mon Sep 19 18:12:32 EDT 2011

And that's what it means by "user code"

Jay

On Tue, Sep 20, 2011 at 6:57 AM, Eric Dobson <endobson at cs.brown.edu> wrote:
> Also IIRC test/exn only works on errors raised using 'error' from
> PLAI, which is different from 'error' from racket/base.
>
> -Eric
>
> On Mon, Sep 19, 2011 at 2:49 PM, John Clements
> <clements at brinckerhoff.org> wrote:
>>
>> On Sep 19, 2011, at 1:47 PM, Jeremy Kun wrote:
>>
>>> Not sure if this is a bug, but it doesn't match the documentation here. It says test/exn only succeeds when the error is explicitly raised by the user, but I try something as simple as:
>>>
>>> "file1.rkt"
>>> (provide foo)
>>> (define (foo) (error "hello"))
>>>
>>> "file2.rkt"
>>> (require plai "file1.rkt")
>>> (test/exn (foo) "hello")
>>>
>>> and the test fails with "no expected value". I can even replace "hello" with a call to error, and see that that argument is never evaluated. So by user-written code, I'm assuming they mean code contained in the same module. Or am I missing something fundamental about Racket's idea of "user-written code"?
>>
>> Just a quick look, but it looks like you're failing to thunk the arguments to test/exn, so it never even gets control.
>>
>> John
>>
>>
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://lists.racket-lang.org/listinfo/users
>>
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93



Posted on the users mailing list.