我一直在玩Racket和Rackunit。我正在將我的小靜態站點生成器移植到Racket,編寫單元測試,並遇到這個奇怪的問題。球拍哈希平等
#lang racket
(require (planet esilkensen/yaml:2:1))
(require rackunit)
(define some-yaml
(string->yaml " - name : ding"))
(check-equal? some-yaml '(#hash(("name" . "ding"))))
測試爲何失敗,出現以下輸出誰能給我解釋一下:
Welcome to DrRacket, version 5.3.3 [3m].
Language: racket; memory limit: 128 MB.
--------------------
FAILURE
name: check-equal?
location: (#<path:/home/ding/Documents/racket/blog-generator> 7 0 119 45)
expression: (check-equal? x '(#hash(("name" . "ding"))))
actual: (#hash(("name" . "ding")))
expected: (#hash(("name" . "ding")))