Skip to content

Commit eac12b1

Browse files
committed
add rename-super and rename-inner tests
1 parent d839a21 commit eac12b1

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

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

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,45 @@
520520
'((66 77) (92 95)) ;; sketchy; should we eliminate?
521521
'((85 88) (92 95))))
522522

523+
524+
525+
;
526+
;
527+
;
528+
;
529+
;
530+
; ;;; ;;;;;;; ;;; ;;;
531+
; ;;; ;;; ;;; ;;;
532+
; ;; ;;; ;;; ;;;;; ;;; ;;; ;; ;;; ;;; ;;; ;;; ;;;;; ;;;
533+
; ;;;;;;; ;;;;; ;;;;; ;;; ;;;;;;; ;;;;; ;;; ;;;;; ;;;;; ;;;;;;; ;;;
534+
; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;;
535+
; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;;; ;;; ;;; ;;; ;;; ;;;; ;;; ;;;;
536+
; ;;; ;;; ;;;;;;; ;;; ;;; ;;; ;;; ;;;;;;; ;;;; ;;; ;;; ;;; ;;; ;; ;;; ;;; ;;;;
537+
; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;;
538+
; ;;;;;;; ;;;;;; ;;; ;;; ;;; ;;; ;;;;;; ;;; ;;;;; ;;;;; ;;;;;;; ;;;
539+
; ;; ;;; ;;;; ;;; ;;; ;;; ;;; ;;;; ;;; ;;; ;;; ;;;;;; ;;;
540+
;
541+
;
542+
;
543+
;
544+
;
545+
; ;;;
546+
; ;;;
547+
; ;;; ;; ;;; ;;; ;;; ;; ;;; ;;; ;; ;;; ;;; ;; ;;; ;; ;;;;; ;;; ;; ;;; ;;;
548+
; ;;;;;;;;;;; ;;;;; ;;;;;;;;;;; ;;;;;;; ;;;;; ;;;;; ;;;;;;; ;;;;;;; ;;;;;;;;;;; ;;;;;
549+
; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;;
550+
; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;;; ;;; ;;; ;;;; ;;; ;;; ;;; ;;; ;;;
551+
; ;;; ;;; ;;; ;;;;;;; ;;; ;;; ;;; ;;; ;;; ;;;;;;; ;;; ;;;; ;;; ;;; ;; ;;; ;;; ;;; ;;; ;;;;;;;
552+
; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;;
553+
; ;;; ;;; ;;; ;;;;;; ;;; ;;; ;;; ;;;;;;; ;;;;;; ;;; ;;; ;;; ;;;;;;; ;;; ;;; ;;; ;;;;;;
554+
; ;;; ;;; ;;; ;;;; ;;; ;;; ;;; ;;; ;; ;;;; ;;; ;;; ;;; ;;;;;; ;;; ;;; ;;; ;;;;
555+
;
556+
;
557+
;
558+
;
559+
;
560+
561+
523562
(check-equal?
524563
(for/set ([e (in-set
525564
(get-binding-arrows
@@ -675,6 +714,31 @@
675714
'((45 59) (206 220))
676715
'((45 59) (276 290))))
677716

717+
(check-equal?
718+
(for/set ([e (in-set
719+
(get-binding-arrows
720+
(string-append
721+
"(module m racket\n"
722+
" (define-local-member-name\n"
723+
" the-method-name1\n"
724+
" the-method-name2)\n"
725+
" (define (m %)\n"
726+
" (class* % ()\n"
727+
" (rename-super [the-super-method-name the-method-name1])\n"
728+
" (rename-inner [the-inner-method-name the-method-name2])\n"
729+
" (define/public (m x)\n"
730+
" (the-super-method-name x)\n"
731+
" (the-inner-method-name (lambda () 0) x))\n"
732+
" (super-new))))\n")))]
733+
;; filter out arrows that don't start on the
734+
;; `the-init-name` that appears inside
735+
;; `define-local-member-name`
736+
#:when (member (car e) (list '(49 65) '(70 86))))
737+
e)
738+
(set
739+
'((49 65) (164 180))
740+
'((70 86) (226 242))))
741+
678742

679743

680744
;

0 commit comments

Comments
 (0)