Skip to content

Commit

Permalink
Test hash-codes on fl/fxvector, stencil-vector
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKnauth committed Apr 26, 2024
1 parent 62102d6 commit 836a1f1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pkgs/racket-test-core/tests/racket/basic.rktl
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@
(test #t equal? (make-flvector 5 0.0) (make-flvector 5 0.0))
(test #t equal? (make-fxvector 5 0) (make-fxvector 5 0))
(test #t equal? (stencil-vector #b10010 'a 'b) (stencil-vector #b10010 'a 'b))
(test #t eq?
(equal-hash-code (make-flvector 5 0.0))
(equal-hash-code (make-flvector 5 0.0)))
(test #t eq?
(equal-hash-code (make-fxvector 5 0))
(equal-hash-code (make-fxvector 5 0)))
(test #t eq?
(equal-hash-code (stencil-vector #b10010 'a 'b))
(equal-hash-code (stencil-vector #b10010 'a 'b)))

(test #f equal? "" (string #\null))

Expand Down Expand Up @@ -165,6 +174,15 @@
(test #f equal-always? (make-flvector 5 0.0) (make-flvector 5 0.0))
(test #f equal-always? (make-fxvector 5 0) (make-fxvector 5 0))
(test #f equal-always? (stencil-vector #b10010 'a 'b) (stencil-vector #b10010 'a 'b))
(test #f eq?
(equal-always-hash-code (make-flvector 5 0.0))
(equal-always-hash-code (make-flvector 5 0.0)))
(test #f eq?
(equal-always-hash-code (make-fxvector 5 0))
(equal-always-hash-code (make-fxvector 5 0)))
(test #f eq?
(equal-always-hash-code (stencil-vector #b10010 'a 'b))
(equal-always-hash-code (stencil-vector #b10010 'a 'b)))

(let ()
(struct s (x) #:property prop:procedure 0)
Expand Down

0 comments on commit 836a1f1

Please sign in to comment.