syntax/parse: add debugging code for deps test case
This commit is contained in:
parent
0c8711a650
commit
95e6244192
|
@ -8,7 +8,8 @@
|
|||
[(mod rel stx load?)
|
||||
(when load?
|
||||
(define res (omnr mod rel stx #f))
|
||||
(hash-set! table (resolved-module-path-name res) #t))
|
||||
(let ([key (resolved-module-path-name res)])
|
||||
(hash-set! table key (cons rel (hash-ref table key null)))))
|
||||
(omnr mod rel stx load?)]
|
||||
[args
|
||||
(apply omnr args)]))
|
||||
|
@ -19,6 +20,8 @@
|
|||
(define-check (check-no-dep mod)
|
||||
(define res ((current-module-name-resolver) mod #f #f #f))
|
||||
(define name (resolved-module-path-name res))
|
||||
(define (not-loaded? name) (not (hash-ref loaded name #f)))
|
||||
(check-pred not-loaded? name)
|
||||
(check-false (hash-ref loaded name #f)))
|
||||
|
||||
(parameterize ((current-module-name-resolver
|
||||
|
@ -28,6 +31,12 @@
|
|||
(current-namespace ns))
|
||||
(namespace-require 'syntax/parse/pre)
|
||||
|
||||
(when #f
|
||||
(printf "loaded dependencies:\n")
|
||||
(let ([mods (filter path? (hash-keys loaded))])
|
||||
(for ([mod (sort mods path<?)])
|
||||
(printf " ~s\n" mod))))
|
||||
|
||||
(test-case "no dep on racket/contract/base"
|
||||
(check-no-dep 'racket/contract/base))
|
||||
(test-case "no deps on impl modules"
|
||||
|
|
Loading…
Reference in New Issue
Block a user