Skip to content

Commit 75d4299

Browse files
committed
test cases for arrows from define-local-member-name
related to racket/racket#4650
1 parent cda4737 commit 75d4299

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

drracket-tool-test/tests/check-syntax/syncheck-direct.rkt

+37
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,43 @@
520520
'((66 77) (92 95)) ;; sketchy; should we eliminate?
521521
'((85 88) (92 95))))
522522

523+
(check-equal?
524+
(for/set ([e (in-set
525+
(get-binding-arrows
526+
(string-append
527+
"(module m racket\n"
528+
" (define-local-member-name the-method-name)\n"
529+
" (class object% (define/public (the-method-name x) 0))\n"
530+
" (send #f the-method-name))\n")))]
531+
;; filter out arrows that don't start on `the-method-name`
532+
#:when (equal? '(45 60) (car e)))
533+
e)
534+
(set
535+
'((45 60) (129 144))
536+
'((45 60) (95 110))))
537+
538+
(check-equal?
539+
(for/set ([e (in-set
540+
(get-binding-arrows
541+
(string-append
542+
"(module m racket\n"
543+
" (define-local-member-name the-method-name)\n"
544+
" (class object%\n"
545+
" (define/public (the-method-name n)\n"
546+
" (unless (zero? n)\n"
547+
" (if (even? n)\n"
548+
" (send this the-method-name (- n 1))\n"
549+
" (the-method-name (- n 1)))))))\n")))]
550+
;; filter out arrows that don't start on the
551+
;; `the-method-name` that appears inside
552+
;; `define-local-member-name`
553+
#:when (equal? '(45 60) (car e)))
554+
e)
555+
(set
556+
'((45 60) (99 114))
557+
'((45 60) (187 202))
558+
'((45 60) (225 240))))
559+
523560
;
524561
;
525562
;

0 commit comments

Comments
 (0)