adjusted the blame objects so that equality tests (and equal hashing) work better
This commit is contained in:
parent
853f14b9a5
commit
1e93424f67
|
@ -320,4 +320,13 @@
|
|||
'(has-complete-blame? (contract (vectorof integer?) (vector 1 2 3) 'pos 'neg))
|
||||
#t)
|
||||
|
||||
(test/spec-passed/result
|
||||
'blame-equality
|
||||
'(let ([b
|
||||
(make-blame (srcloc "src.rkt" #f #f #f #f)
|
||||
'whatever (λ () 'the-name) 'pos 'neg #t)])
|
||||
(equal? (blame-add-context b "thing" #:important 'yes!)
|
||||
(blame-add-context b "thing" #:important 'yes!)))
|
||||
#t)
|
||||
|
||||
)
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
[context new-context]
|
||||
[top-known? #t]))
|
||||
|
||||
(struct important (name sense-swapped?))
|
||||
(struct important (name sense-swapped?) #:transparent)
|
||||
|
||||
(define (blame-add-unknown-context b)
|
||||
(define old (blame-context b))
|
||||
|
|
Loading…
Reference in New Issue
Block a user