phc-ts/test/same-id-pattern-test.rkt

12 lines
328 B
Racket

#lang racket
(require syntax/parse
phc-ts/same-id-pattern
rackunit)
(check-true (syntax-parse #'(a 1 2 a 4)
[(y _ ... {~same-free-id y} _ ...) #t]
[_ #f]))
(check-false (syntax-parse #'(a 1 2 b 4)
[(y _ ... {~same-free-id y} _ ...) #t]
[_ #f]))