[racket-dev] [plt] Push #23053: master branch updated

From: Casey Klein (clklein at eecs.northwestern.edu)
Date: Sun Jul 17 09:27:02 EDT 2011

On Sat, Jul 16, 2011 at 10:52 PM, Robby Findler
<robby at eecs.northwestern.edu> wrote:
> Thanks for fixing the bug!
> On Sat, Jul 16, 2011 at 6:40 PM, Casey Klein
> <clklein at eecs.northwestern.edu> wrote:
>> I tried to add a test case to
>> collects/tests/racket/contract-test.rktl, but that file seems broken.
>> In particular, `test/pos-blame' and `test/neg-blame' pass strings when
>> `test/spec-failed' expects a symbol. Fixing that mismatch causes
>> hundreds of existing tests to fail.
> They seem to work for me. I've pushed a new test case.

Here's what I tried:

1. I added this test, which should fail for identifying the wrong party:

   '((contract (-> integer? (values integer? integer?))
               (lambda (x) (values 1))

2. From the directory containing contract-test.rktl, I ran:

$ racket
Welcome to Racket v5.1.2.3.
> (load "contract-test.rktl")

and got this message:

Passed all tests.
(Other messages report successful tests of error-handling behavior.)

Those other messages contain this output for the new test:

testing: contract-arrow-wrong-number-values
((contract (-> integer? (values integer? integer?)) (lambda (x)
(values 1)) (quote pos) (quote neg)) 1)  =e=> exception raised by
exception handler: test/spec-failed: unknown blame name "neg";
original exception raised: self-contract violation: expected 2 values,
returned 1 value
  contract from: pos, blaming: pos
    (-> integer? (values integer? integer?))

Posted on the dev mailing list.