Skip to content

Commit d839a21

Browse files
committed
add field tests
1 parent 95163bd commit d839a21

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,35 @@
646646
'((45 58) (179 192))
647647
'((45 58) (201 214))))
648648

649+
(check-equal?
650+
(for/set ([e (in-set
651+
(get-binding-arrows
652+
(string-append
653+
"(module m racket\n"
654+
" (define-local-member-name the-field-name)\n"
655+
" (define c%\n"
656+
" (class* object% ()\n"
657+
" (field [the-field-name (λ (x) x)])\n"
658+
" (set! the-field-name void)\n"
659+
" (list the-field-name)\n"
660+
" (the-field-name 5)\n"
661+
" (super-new)))\n"
662+
"\n"
663+
" (class c%\n"
664+
" (inherit-field the-field-name)\n"
665+
" (super-new)))\n")))]
666+
;; filter out arrows that don't start on the
667+
;; `the-init-name` that appears inside
668+
;; `define-local-member-name`
669+
#:when (equal? '(45 59) (car e)))
670+
e)
671+
(set
672+
'((45 59) (111 125))
673+
'((45 59) (150 164))
674+
'((45 59) (183 197))
675+
'((45 59) (206 220))
676+
'((45 59) (276 290))))
677+
649678

650679

651680
;

0 commit comments

Comments
 (0)