On Mar 22, 2009, at 7:31 AM, Michael Sperber wrote:


Eli Barzilay <[email protected]> writes:

You can do that either in a new "tests/deinprogramm" collection, or in
some "deinprogramm/whatever" subcollection.  In any case, tell me
about it so I know how to update the distribution specs.

I've checked test code into tests/deinprogramm.

And keep in mind my comment too -- it's fine for your tests to rely on
the stepper tests, but if it goes the otherway then the dependencies
will get messed up.

Yes - my plan is to just run the tests myself prior to releases.

For what it's worth, I've done a rough refactoring of the stepper's tests to make it possible to use this framework for your tests as well. Here's a simple example of a module that contains just one test. Now we can see how much work we've duplicated...

John




#lang scheme

(require tests/stepper/test-engine
         tests/stepper/test-abbrev
         (prefix-in m: tests/stepper/language-level-model)
         stepper/private/model-settings)

;; I'll be honest with you: I'm mostly in the dark w.r.t why
;; this parameterization is necessary.... I'm guessing it
;; has to do with the mutation of the current namespace
;; that occurs in run-teaching-language
(parameterize ([current-namespace (make-base-namespace)])



  (let* ([defs1 `((define (a x) (+ x 5)) (define b a))]
         [defs2 (append defs1 `((define c a)))])
(apply ;; you can abstract over this application with a define-syntax
     run-one-test
     (tt 'top-ref4                   ;; - the name of the test
m:intermediate ;; - the language level (or levels) to run in ,@defs1 (define c b) (c 3) ;; - the expressions to test (everything up to the first ::) :: ,@defs1 (define c {b}) ;; - the steps; the '::' divides steps, repeated '->'s indicate -> ,@defs1 (define c {a}) ;; that the 'before' of the second step is the 'after' of :: ,@defs2 ({c} 3) ;; the first one. the curly braces indicate the hilighted sexp.
         -> ,@defs2 ({a} 3)
         :: ,@defs2 {(a 3)}
         -> ,@defs2 {(+ 3 5)}
         -> ,@defs2 {8}))))

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_________________________________________________
  For list-related administrative tasks:
  http://list.cs.brown.edu/mailman/listinfo/plt-dev

Reply via email to