in the middle of repairing bugs in hashcode
This commit is contained in:
parent
3066822ad0
commit
6b20b6e1fc
|
@ -2,16 +2,18 @@
|
|||
(require (planet dyoo/whalesong/lang/private/shared))
|
||||
|
||||
;; boxes
|
||||
"boxes"
|
||||
(equal-hash-code (box 42))
|
||||
|
||||
;; bytes
|
||||
"bytes"
|
||||
(equal-hash-code #"testing")
|
||||
;; chars
|
||||
|
||||
"chars"
|
||||
(equal-hash-code #\A)
|
||||
(equal-hash-code #\B)
|
||||
;; hashes
|
||||
|
||||
"hashes"
|
||||
(equal-hash-code (make-hash '((1 . x)
|
||||
(2 . y)
|
||||
(3 . z))))
|
||||
|
@ -24,6 +26,7 @@
|
|||
;
|
||||
|
||||
;; lists
|
||||
"lists"
|
||||
(equal-hash-code (list 1 2 3 4 5))
|
||||
(equal-hash-code (shared ([a (cons 1 b)]
|
||||
[b (cons 2 a)])
|
||||
|
@ -36,16 +39,21 @@
|
|||
;;
|
||||
|
||||
;; strings
|
||||
"strings"
|
||||
(equal-hash-code "Hello world")
|
||||
|
||||
;; structs
|
||||
"structs"
|
||||
(define-struct thing (name age) #:mutable)
|
||||
(equal-hash-code (make-thing "danny" 32))
|
||||
(equal-hash-code (shared ([a (make-thing a a)]) a))
|
||||
|
||||
;; symbols
|
||||
"symbols"
|
||||
(equal-hash-code 'hello)
|
||||
(equal-hash-code 'world)
|
||||
|
||||
;; vectors
|
||||
"vectors"
|
||||
(equal-hash-code #(1 2 3 4 5))
|
||||
(equal-hash-code (shared ([v (vector 1 2 v 3 v)]) v))
|
||||
|
|
Loading…
Reference in New Issue
Block a user