Skip to content

Commit 53abe9c

Browse files
Fix 1 occurrence of define-let-to-double-define
This `let` expression can be pulled up into a `define` expression.
1 parent 16a98c9 commit 53abe9c

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

typed-racket-test/main.rkt

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -159,23 +159,19 @@
159159

160160
(define (just-one p*)
161161
(define-values (path p b) (split-path p*))
162+
(define dir (path->string path))
162163
(define f
163-
(let ([dir (path->string path)])
164-
(cond [(regexp-match? #rx"fail/" dir )
165-
(lambda (p thnk)
166-
(define-values (pred info) (exn-pred p))
167-
(parameterize ([error-display-handler void])
168-
(with-check-info
169-
(['predicates info])
170-
(check-exn pred thnk))))]
171-
[(regexp-match? #rx"succeed/" dir)
172-
(lambda (p thnk) (check-not-exn thnk))]
173-
[(regexp-match? #rx"optimizer/tests/$" dir)
174-
(lambda (p* thnk) (test-opt p))]
175-
[(regexp-match? #rx"optimizer/missed-optimizations/$" dir)
176-
(lambda (p* thnk) (test-missed-optimization p))]
177-
[else
178-
(error 'just-one "Unknown test kind for test: ~a" p*)])))
164+
(cond
165+
[(regexp-match? #rx"fail/" dir)
166+
(lambda (p thnk)
167+
(define-values (pred info) (exn-pred p))
168+
(parameterize ([error-display-handler void])
169+
(with-check-info (['predicates info]) (check-exn pred thnk))))]
170+
[(regexp-match? #rx"succeed/" dir) (lambda (p thnk) (check-not-exn thnk))]
171+
[(regexp-match? #rx"optimizer/tests/$" dir) (lambda (p* thnk) (test-opt p))]
172+
[(regexp-match? #rx"optimizer/missed-optimizations/$" dir)
173+
(lambda (p* thnk) (test-missed-optimization p))]
174+
[else (error 'just-one "Unknown test kind for test: ~a" p*)]))
179175
(test-suite
180176
(path->string p)
181177
(f

0 commit comments

Comments
 (0)