[racket] DrRacket submodules to run

From: Manfred Lotz (manfred.lotz at arcor.de)
Date: Sun Dec 29 04:24:31 EST 2013

On Sat, 28 Dec 2013 22:42:48 -1000
Ryan Davis <zenspider at gmail.com> wrote:

> If I look at the language setting details I can choose what
> submodules to run (main / test / others). But what I can't control is
> the _order_ of the submodules. I simply don't want to run main if my
> tests are going to fail but for some reason tests run afterwards, not
> before. My questions:
> 
> 1) Is there a reason for running main and then test, not the other
> way around? Cause I simply don't get it.
> 
> 2) Is there any way for me to override this order?
> 
> 3) If #2 is possible, is there a way to ensure that main won't run if
> test fails?
> 
> 
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
> 

Hm, not sure I'm qualified to answer.

However, take this minimal example:

#lang racket

(define (run)
  (displayln "hey"))


(module+ main
  (run)
  )


(module+ test
  
  (require rackunit)
  
  (check-equal? 1 1)
  (check-equal? 1 2)
  "all tests run")


Now:

raco test test.rkt

The last test fails but module main isn't run.


racket test.rkt

This runs main and no test is done.


I don't see the problem you have. Perhaps, I misunderstood what you are
after.

-- 
Manfred



Posted on the users mailing list.