Skip to content

Commit

Permalink
make parametrize test more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Jan 11, 2024
1 parent 257b92f commit 8828117
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/parametrize.scm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
(test "parameterize: lexical"
(lambda (t)
(define location (make-parameter "here"))

(t.is (location) "here")

(t.is (parameterize ([location "there"]) (location))
"there")

(t.is (parameterize ([location "in a house"])
(list (location)
(parameterize ([location "with a mouse"])
Expand All @@ -23,6 +26,7 @@
(test "parametrize: change value"
(lambda (t)
(define location (make-parameter "here"))

(t.is (list (location) (begin (location "there")
(location)))
'("here" "there"))))
Expand Down

0 comments on commit 8828117

Please sign in to comment.