File tree Expand file tree Collapse file tree 2 files changed +32
-3
lines changed
typed-racket-test/unit-tests Expand file tree Collapse file tree 2 files changed +32
-3
lines changed Original file line number Diff line number Diff line change 1818 (Pair Symbol (Pair (Listof XExpr-Attribute) (Listof XExpr)))
1919 (Pair Symbol (Listof XExpr))))
2020
21- (require/typed/provide xml
21+ (require/typed xml
2222 [#:struct location
2323 ([line : (U False Exact-Nonnegative-Integer)]
2424 [char : (U False Exact-Nonnegative-Integer)]
25- [offset : Exact-Nonnegative-Integer])
26- #:type-name Location]
25+ [offset : Exact-Nonnegative-Integer])])
26+
27+ (define-type Location
28+ (U location Symbol False))
29+
30+ (require/typed/provide xml
2731 [#:struct source
2832 ([start : Location]
2933 [stop : Location])
Original file line number Diff line number Diff line change 1+ #lang typed/racket/base
2+
3+ (module+ test
4+
5+ (require typed/rackunit
6+ "../../typed-racket-more/typed/xml.rkt " )
7+
8+ (let ([xml-p-i
9+ (p-i #f #f 'xml "version=\"1.0\" encoding=\"UTF-8\" " )])
10+ (check-eq?
11+ (source-start xml-p-i)
12+ #f )
13+ (check-eq?
14+ (source-stop xml-p-i)
15+ #f ))
16+
17+ (let ([xml-p-i
18+ (p-i 'racket 'racket 'xml "version=\"1.0\" encoding=\"UTF-8\" " )])
19+ (check-eq?
20+ (source-start xml-p-i)
21+ 'racket )
22+ (check-eq?
23+ (source-stop xml-p-i)
24+ 'racket )))
25+
You can’t perform that action at this time.
0 commit comments